let s = "15 times 15 is 225";
console.log(s.replace(/\d+/gu, (v) => `0x${parseInt(v).toString(16)}`)); // 0xf times 0xf is 0xe1
